import { Big } from "../core/Big";
import { Terrain } from "../core/Point";

export class 妖术 extends Big {

    num_sacrificial = 0     //献祭大子的个数

    terrainAdapt() {
        switch (this.point.terrain) {
            case Terrain.SHAN:
            case Terrain.SHUI:
                this.die(this.player)
        }
    }
  
    /** 献祭
     * @param num_die 献祭的大子个数
     */
    immolate(num_die: number) {
        this.num_sacrificial += num_die
        let yu = this.num_sacrificial % 3
        let chu = Math.floor(this.num_sacrificial / 3)
        this.num_sacrificial = yu
        this.player.small.changeEnergy(chu)
    }
}